package CONTROLADOR;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import VISTA.*;

public class ControladorMenuPrincipal implements ActionListener {
	private MenuPrincipal frmMenuPrincipal;
	
	public ControladorMenuPrincipal() {
		this.frmMenuPrincipal = new MenuPrincipal();
		this.frmMenuPrincipal.addListener(this);
		this.frmMenuPrincipal.setVisible(true);
	}
	
	public void actionPerformed(ActionEvent evt) {
		
		if(evt.getActionCommand().equals("Ingredientes")){
			new ControladorIngredientes();
		}
		else if(evt.getActionCommand().equals("Productos")){
			new ControladorProductos();
		}
		else if(evt.getActionCommand().equals("Categorias")){
			new ControladorCategorias();
		}
		else if(evt.getActionCommand().equals("Ordenes")){
			new ControladorOrden();
		}
		else if(evt.getActionCommand().equals("Listados")){
			new ControladorListados();
		}
	}//end actionPerformed
}
